package com.turbo.cloud.ums.web.model.dept;

import com.turbo.cloud.core.base.BaseModel;
import com.turbo.cloud.core.validated.InsertValidated;
import com.turbo.cloud.core.validated.UpdateValidated;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;


/**
 * <p>
 * 部门表
 * </p>
 *
 * @author zhangluning
 * @since 2022-10-11
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
@Accessors(chain = true)
public class UmsDeptDo extends BaseModel {

    /**
     * 主键
     */
    @NotBlank(message = "部门ID不能为空", groups = {UpdateValidated.class})
    private String id;

    /**
     * 系统Id
     */
    private String systemId;

    /**
     * 父级权限id
     */
    private String parentId;

    /**
     * 部门名称
     */
    @NotBlank(message = "部门名称不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String deptName;

    /**
     * 部门编码
     */
    @NotBlank(message = "部门编码不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private String deptCode;

    /**
     * 描述
     */
    private String note;

    /**
     * 排序
     */
    @NotNull(message = "部门排序不能为空", groups = {InsertValidated.class, UpdateValidated.class})
    private Integer sort;
}
